import request from './request'
// export const chat = {
//   async getChat(id, id2, limit) {
//     return await request.get('/api/chat/getChat', { id, id2, limit })
//   },
//
//   async addChat(userId, otherId, str, type) {
//     return await request.post('/api/chat/addChat', { userId, otherId, str, type })
//   },
//
//   async getChatUserList(id) {
//     return await request.get('/api/chat/getChatUserList', { id })
//   },
//
//   async getUserMsg(id) {
//     return await request.get('/api/chat/getUserMsg', { id })
//   },
// }




export const user = {
  async getUserMsg(id) {
    return await request.get('/api/users/getUserMsg', { id })
  },
  async getUser(token){
    return await request.get('/api/users/getUser',{token})
  }
}

export const home = {
  async getHome(){
    return await request.get('api/home/getHome')
  }
}
export const myLogin = {
  async sigIn(username,password){
    return await request.post('/api/sigIn/login.do',{username,password})
  }
}

